1. Field of the Invention
The present invention relates to a database access system for use in accessing a plurality of distributed databases from a plurality of client terminals; and a computer program product, which contains an application program for the same.
This application is based on patent application No. Hei 10-146371, filed in Japan, the content of which is incorporated herein by reference.
2. Description of the Related Art
FIG. 5 is a block diagram, showing a structure of a conventional database access system. The database access system in this diagram exhibits a three-layer structure, comprising a client layer, an intermediate layer, and a database layer.
In the client layer shown in FIG. 5, client terminals (computers) 301-303 installed at the client site are respectively connected to a network 3. The network 3 can be, for example, an internet. Furthermore, each of the client application programs 311-313 executed by the respective client terminal 301-303 is recorded into the memory portion of each respective client terminal 301-303.
These client application programs 311-313 are programs for requesting a service with regard to an application server 34, described hereinafter, and for receiving the results of said service.
In addition, in the database layer, the database servers 321-323 are computers which store the databases 331-333, delivered via the network 3. Each respective database 331-333 is recorded into the memory portion of the corresponding database server 321-323. These databases 331-333 are all identical in type.
Furthermore, in the intermediate layer, the application server 34 is a computer which accommodates the client terminals 301-303 via the network 3, and is connected to the database servers 321-323. The application server 34 processes service requests from each of the client terminals 301-303. Additionally, the server application program 35, run by the application server 34, is stored into a memory portion of the application server 34.
The server application program 35 is a program for performing the above-mentioned services, an example of which includes accessing the databases 331-333, described later. In other words, the application server 34 accesses the databases 331-333, based on a service request from a client terminal 301-303, and performs transactions such as updating and reading data, etc. Herein, data update is performed by means of a two-phase commit, comprising the two phases of temporary updating and permanent updating.
In the application server 34, the transaction processing (TP) monitor 36 performs distributed transaction processing, or more concretely, accesses the databases 331-333. Hereinafter, distributed transaction processing represents the process of accessing the distributed databases 331-333.
Herein, the distributed transaction standard employs a TX/XA interface using X/Open. FIG. 6 is a block diagram, showing a reference model of the above-mentioned distributed transaction processing; and FIG. 7 is a block diagram, showing a TX/XA interface using X/Open. In FIGS. 6 and 7, the corresponding parts to FIG. 5 have the same reference numbers.
In FIG. 6, the transaction manager 37 corresponds to the transaction processing monitor 36 shown in FIG. 5, and possesses an interface with the server application program 35.
The resource mangers 381-383 are, individually, managed by the server application program 35 and the transaction manager 37, and correspond, respectively, to the databases 331-333 shown in FIG. 5. Herein, the resource managers 381-383 interface with both the transaction manager 37 and the server application program 35.
In addition, in FIG. 7, the resource manager 381, (see FIG. 6) is a general term for the database 331, (see FIG. 5) and the communication resource manager 391. The communication resource manager 391 controls communication between other systems (not shown) and the database server 321, via the network 44. Herein, FIG. 7 shows only a structure of the resource manager 381, shown in FIG. 6; however, structures of the resource managers 382 and 383, shown in FIG. 6, are identical to the structure of the resource manager 381, shown in FIG. 7.
The TX interface 40 is an interface between the server application program 35 and the transaction manager 37. The XA interface 41 is an interface between the transaction manager 37 and the database 331. The XA+interface 42 is an interface between the transaction manager 37 and the communication resource manager 391. The application/resource manager interface 43 is an interface between the server application program 35 and the database 331.
As described above, a conventional database access system possesses four interfaces: the TX interface 40; the XA interface 41; the XA+interface 42; and the application/resource manager interface 43. Further, the database 331, is accessed by each of the server application program 35 and the transaction manager 37, via another interfaces such as the XA interface 41 and the application/resource interface 43, respectively.
In the following, the operation of the above-mentioned conventional database access system is described.
In the descriptions below, an example case in which a client terminal 301, shown in FIG. 5, requests the application server 34 for a service, such that the application server 34 updates the databases 331, and 332, in order to respond to the service request.
In FIG. 5, when service request data is inputted from the client terminal 301, to the application server 34 via the network 3, the application server 34 performs the following processing by means of running the server application program 35.
That is, the application server 34 accesses the database servers 321, and 322, in order to temporarily update the databases 331, and 332. Concretely, the server application program 35 (i.e., the application server 34) provides the command for temporarily updating the database to the transaction manager 37 via the TX interface 40. As a result, the transaction manager 37 temporary updating of the above-mentioned data, by means of accessing the databases 331, and 332 via the XA interface 41.
Subsequently, after this temporary updating is completed, under normal circumstances, the server application program 35 (i.e., the application server 34) outputs the control data for performing permanent updating of the databases 331, and 332, to the transaction manager 37 via the TX interface 40. Accordingly, the transaction manager 37 performs permanent updating of the data, by means of accessing the databases 331 and 332 via the XA interface 41.
A conventional database access system is designed to access a plurality of the databases 331-333 in parallel, by means of a single transaction manager 37 (i.e., transaction processing monitor 36). This causes in an extremely complex structure for both the transaction manager 37 (i.e., transaction processing monitor 36) and the TX interface 40.
Additionally, a conventional database access system is designed to have four interfaces: the TX interface 40; the XA interface 41; the XA+interface 42; and the application/resource manager interface 43, shown in FIG. 7, which results in a large number of interfaces.
In summary, a conventional database access system is disadvantageous from the viewpoint of its high costs secondary to the above-mentioned complex structure and large number of interfaces.
Moreover, a conventional database access system accesses a plurality of the databases 331-333 by means of a single transaction manager 37 (i.e., the transaction processing monitor 36). Accordingly, it is absolutely necessary for the databases 331-333 to be identical in type.
Thus, conventional database access systems are also disadvantageous in being unable to handle different types of databases.
In consideration of the above-mentioned, a object of the present invention is to provide an economical database access system possessing a simple structure, which can handle different types of databases.
According to the present invention, the above-mentioned object is achieved by means of a database access system comprising: a plurality of database servers, each of which accommodates a database; an application server which is connected to each of the database servers; wherein the application server comprises a plurality of local transaction managers, each of which corresponds to the databases, and processes transactions for updating these databases; and a distributed transaction manager which individually provides commands for database updating to each of the local transaction managers.
According to the present invention, a plurality of local transaction managers which correspond to a plurality of databases are installed in each application server, and these local transaction managers process, individually, an accessing transaction (i.e., updating transaction). Accordingly, according to the present invention, when compared to a conventional database access system, it is possible to simplify processing control, which in turn simplifies the overall system structure, thereby lowering costs.